package cn.charlab.boot.oss.config;


import cn.charlab.boot.oss.OssTemplate;
import cn.charlab.boot.oss.properties.OssProperties;
import cn.charlab.boot.s3.S3Template;
import cn.charlab.boot.s3.properties.S3ConfigProperties;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;


@AutoConfiguration
@EnableConfigurationProperties(value = OssProperties.class)
public class OssConfigAutoConfiguration {

    @Bean(destroyMethod = "destroy")
    public OssTemplate ossTemplate(OssProperties ossProperties){
        return new OssTemplate(ossProperties);
    }
}
